printf(): is a standard function in C
C Characters Sets and C Tokens
c character sets |
C Character
Set:
A C program is
a collections of number of instructions written in meaningful order.
Further instructions
are made up of Keyword, Variables and Functions etc which
uses the C
character set defined by C. It is collections of various
characters, digits, and
symbols which can be used in a C program. It
comprises followings below:-
symbols in c |
‘C’ Tokens:
Smallest individual unit in a C
program is called C token. Our C program are
building by using these tokens.
They are use in C program in different-different
1.Keywords:-
Keywords are those words whose
meaning has already been known to the
system or compiler. That is meaning of each keywords is fixed. You can only use
the keyword for its predefined meaning. You cannot change the meaning of
keywords. Also you cannot use keywords as names for Variables, Functions.
Arrays etc. All the keywords are written in small case letters. In C 32 keywords
are available as followings below:-
system or compiler. That is meaning of each keywords is fixed. You can only use
the keyword for its predefined meaning. You cannot change the meaning of
keywords. Also you cannot use keywords as names for Variables, Functions.
Arrays etc. All the keywords are written in small case letters. In C 32 keywords
are available as followings below:-
keywords in c |
2.Identifiers:-
Identifiers are names given to
various program elements like Variables, Structures,Union, Constants
-names, Macros etc.
Rules for writing identifiers as
followings below:-
#1. First letter must be an alphabet
or underscore ( _ ).
#2. From second character onwords any
combinations of digits, alphabets, or
underscore is allowed.
underscore is allowed.
#3. Only digits, alphabets,
underscore, are allowed. No other symbols is allowed.
#4. Keywords cannot be used as
identifiers.
#5. For ANSI (American National
Standard Institute) C maximum length of
identifiers is 32,but many compiler support more than 32.
identifiers is 32,but many compiler support more than 32.
Examples of Valid and Invalid
Identifiers (On the basis of above rules):-
valid invalid identifiers in c |
3.Constants:-
Constants in C programming language refer to
fixed values that do not change during the execution of a program. There are
various types of constants in C. They are classified into followings categories
as below:-constants in c |
#1. Numeric Constants:- There
are two types of numeric constants as followings below:-
#A. Integer Constants:- Integer constants also have further types as
followings below:-
#a. Decimal
Constants:- They are sequence of digits from 0 to 9 without
fractional
part. It may be negative, positive or zero.
Example: 22, 817, -8137, 0.
#b. Octal
Constants:- They have sequence of numbers from 0 to 7 and first
digit
must be 0.
Example: 045, 0, 0671, 028.
#c. Hex
Decimal Constants:- They have sequence of digits from 0 to 9 and
(Represents 10 to 15). They start with 0x or 0X.
Example: 0x37, 0xab17, 0X81AB.
#B. Real Constants:-They are the number with fractional part. They also known as
floating
point
constants.
Example: 45.67, 0.78, 5.278.
Real constants
can be also be represented in exponential or scientific notation which
consists of two
part. For example the number 212.345 can be represented as
where e+2
means 10 to the power 2. Here the portion before the e that 2.12345
is is known
mantissa and +2 is the exponent.
#2. Non Numeric Constants:- They are two type as followings below:-
#A. Single Character Constants:-They are enclosed in
single quotes.They consists of
single character or
digit. Character constants have integer values known as ASCII
(American Standard
Institute Code for Information Interchange)values
Example:ASCII value Of A
is 65.
#B. String Constants:- They are sequence of characters, digits, or any
symbols enclosed
in double
quotes.
Example: “Hello
World”, “15 August 1947”, “Hello C 1978”, “145.18891B”.
Backslash
Constants:- C defines several backslash
character constants which are used
for special purpose. They are called so because each constants start with backslash (\).
They are represented with 2 characters whose
general form is \char but treated as a singlefor special purpose. They are called so because each constants start with backslash (\).
character. They are also called escape sequences. You will see their usage in others post.
Backslash constants are as followings below:-
backslash constants in c |
4.Operators:-
The operators are the symbols, they performs operation with operands
The operators are the symbols, they performs operation with operands
Example: 12+14
Here 12 and 14 are operands and + is
Arithmetic operator that will generate results 26. We will learn more about
Operators and Operands in Next Post. Operators are as followings below:-
operators in c |
5.Special
Symbols:-
They are also known as
separators. They are use in our program like Arrays, Functions and
Function,
Structure, Union and Others Blocks of Codes.
They are three type followings
below:-
special symbols in c |
Overview Of The C Programming Language
C is a programming language developed in 1972 at AT & T Bell Laboratories, Murray Hill, New Jersey, of United State America. It was designed and written by Dennis Ritchie. C is general purpose programming language with lots of features. It is called middle level programming language because it is combination of High Level Programming Language and Low Level Assembly & Machine Programming Language.
C language have some high elements from High Level Programming Language and with the control and functionality of Assembly & Machine Language.
C programming language provide a relatively good programming efficiency and relatively good machine efficiency.
Initially it was designed for programming of a operating system called UNIX operating system and the tools supplied with it including the C compiler itself are written in C.
C is a structured programming language which allows variety of programs in small modules(functions). C follows Top-Down Programming Approach to design and writing a program.
C programming language is easy and convenient to learn, understand and implements. C language covers most of all programming languages basic features so if you had learn C language then will be easy to learn others programming languages.
C programming language is easy and convenient to learn, understand and implements. C language covers most of all programming languages basic features so if you had learn C language then will be easy to learn others programming languages.
dennis ritchie |
History Of C Programming Language
#1. In the 1960 a programming language is developed is called Combined Programming Language at Cambridge University.
#2. Later on also a new programming was developed is called Basic Combined Programming Language (BCPL) by Martin Richards at Cambridge University.
#3. After sometime a new Programming Language called B Programming language was invented by Ken Thomson come into existence.
#4. In 1970 Dennis Ritchie inherited the features of B & BCPL Programming Language and did add some new features and developed a new language that is "C" Programming Language.
#5. C was developed on DEC PDP-11 Machine That used the UNIX operating system.
#6. In 1978 C Programming Language first time described in the book as title "The C Programming Language " by Dennis Ritchie.
#7. The ANCI (American National Standards Institute) was finally adopted C Programming Language in December 1990 for standardized the C language in the market.
Features/ Characteristics/ Importance Of “C Programming Language”
#1. C programming language is reliable ,simple,and easy to learn, understand and use for anyone interested.
#2. C programming language in combination of High-Level Programming Language & Low Level Programming Language both features in it.
#3. The C programming language supports user defined data types (Structure &Union).
#4. The C Programming supports modular and structured programming concepts to design C Programs, In C language we can easily read and write our own functions.
#5. The C programming language supports a rich library of predefined functions that can be easily used by the programmers.
#6. It supports pointers with pointers operations this feature allows programs to access memory addresses directly where variables are stored and to perform Bit level manipulations of data stored in memory processor register.
#7. It
provide low level memory and device access feature making it suitable for writing programs.
#8. It
is a small and concise language providing easy way translating language codes int corresponding efficient machine language code.
#9. It
is standardized by the several international body making C programs easily portable from one computer to another computer.
Why C Programming Language is so important?
#1. Oracle Database management System is written in C programming language.#2. Core libraries of trending hot technology Android are written in C programming language.
#3. MySQL Database Management System is written in C programming language.
#4. Almost every device driver are written using C programming language.
#5. Major part of almost web browser is written in C programming language like Google Chrome, Apple Safari,Opera.
#6. UNIX operating system is developed using C programming language.
#7. C is world’s most popular programming language, but having some parameters.
Student View- Importance of C Programming Language
#1. C programming language is important to build programming skills at beginning level for anyone.#2. C programming language covers basic features of all programming languages so it also help to learn others programming languages.
#3. C language is also helpful in campus recruitment process to getting job in company.
#4. C language is the most popular language for hardware dependent programming.
Introduction To Programming And Programming Languages
programming world |
Programming
Writing programs or instructions by using some computer programming language like C, C++, JAVA, PYTHON etc, for accomplishing some specific task, services, action and functionality by using computer system for user desired purpose called programming.
Programming is like real world planning for something because that whenever we are planning something like picnic we decide how many actions we will performs there, when go there, when coming here from there, how many time we will spend there, how many people go there and what will do there etc in the picnic, also in programming we step by step write instructions or programs (code) that will be read and executes by the by computer system for accomplishing user desired some specific programs or task, services and actions etc.
In computer world who writes programs are called programmer, and process is called programming.
The main purpose of programming is to solve real world problem by using computer system with their understandable languages.
Introduction to languages
What is language?
The languages are way to communication, we use languages for shares or express our thoughts, views, ideas,
knowledge, opinion to the peoples. The languages are plays very important role in our daily life. The languages are the ways to understand anything in the world in very easily because it is easy to writes and understand by the people.
We use many languages in our daily life like Hindi, English, Bengali, Marathi, Urdu, etc for sharing or expressing something to the others peoples. So the language have lots of advantages in ours life.
We use many languages in our daily life like Hindi, English, Bengali, Marathi, Urdu, etc for sharing or expressing something to the others peoples. So the language have lots of advantages in ours life.
How many types of
language we use?
There are
mainly two types of languages that we are use.
2.
Computer languages.
Natural
Languages
Computer
Languages
Types Of Computer Programming Languages:
Assembly Languages
Features of this language are
High-Level Languages
Features of this language are:
Natural
Languages
The
languages which are used to communication between human to human is
called natural language. Like
Hindi, English, French, Bengali etc are the natural languages. The languages are plays important role in ours daily life, without language we cannot effectively and easily shares or
expresses our thoughts, idea, and knowledge to another person.
The languages are the ways to understand easily anything in the world.
The languages are the ways to understand easily anything in the world.
natural languages |
Computer
Languages
We all know that the
computer system cannot understand the natural or human language because they are just
machine they have no any emotions and feelings to understand anything like human being. Whenever we wants computer do something for ours desired purpose then first of all we need to instructs to the computer system in their understandable languages. So we use computer languages to communication between human to
computer that the language computer system understand. The language which is used to
communication between human to computer system is called computer languages like C, C++, Java, Python, JavaScript etc.
Types Of Computer Programming Languages:
There are
three types of computer programming languages:
1. Machine Languages.
2. Assembly Languages.
3. High-Level Languages.
Machine Languages
Features of this language are
2. Assembly Languages.
3. High-Level Languages.
Machine Languages
Machine
language is called the language of computer that the computer system understand only.
The machine language in the computer world is represented by the consists of two binary digits that 0's and 1's.The machine language
is written by using these sequence of combination of two binary digits 0’s and 1’s.
The machine language in the computer world is represented by the consists of two binary digits that 0's and 1's.The machine
In machine language
whenever we want computer do something, then we write everything by using combinations of 0’s and 1’s sequences. Using this language whatever you
want to input to computer has to be supplied in the forms of
sequence of of 0’s and 1’s .
For Example: character
A May be represented as 01100101 ,0 itself may be represented as 01001000 and so on.
For
Features of this language are
#1. The machine language consists
of sequence of two binary digits that is of 0’s and 1’s.
#2. Machine
languages are called natural languages of computers.
#3. The machine instruction(code) internally converted in sequences of combinations 0's and 1's that further also converted into electric signals.
#4. Each
and every instruction, command or operation must be stated in the form of sequences 0's
and 1's.
#5. Execution
of program is very fast if the instruction were written in machine language (instructions) because they are directly understand by the computer system.
#6. Machine
language (instructions) are the are machine dependent.
#7. Machine
language is difficult to write(programs), and very tough modify and error finds from it.
#8. The
machine language does not required any translator.
Assembly Languages
Assembly language are commonly called assembly, asm or symbolic languages. The assembly languages are machine languages but they use some human readable symbols or code that will easily understand by the human being.
The assembly languages use some human-readable notation for the writing instruction for the computer system. The assembly languages are the depends on computer system architecture, different- different machine supports different assembly languages for process instructions.
The assembly languages use some human-readable notation for the writing instruction for the computer system. The assembly languages are the depends on computer system architecture, different- different machine supports different assembly languages for process instructions.
In the assembly languages having separate translator to converted instruction to the corresponding machine languages.
The translator are used to converts assembly language instructions to machine language instructions is called assembler. In assembly language symbolic notation are
called mnemonics or asm codes.
The translator are used to converts assembly language instructions to machine language instructions is called assembler. In assembly language
Features of this language are
#1. In the assembly language
mnemonics code or notations is used to write instruction or programs for computer system, they are small words like Add, Sub, Mul, Div which
represent addition, subtraction and division etc.
#2. For
writing instructions or programs set of mnemonics are made fixed for a specific type
of machine or computer systems. The instructions are written using these mnemonics
but internally converted(translated) into machine language
instruction.
#3. For translating a assembly instruction into machine instruction a translator is required is called assembler of that language. In assembly language world each and every assembly language have a different-different assembler.
#3. For translating a assembly
#3. Assembler
is any system software which is specific for a specific machine.
#4. Assembly
languages are Easier to understand and modify and error finding.
#5. Assembly
languages are Easy to locate and correct errors.
High-Level Languages
The high level language is combinations of machine and assembly languages. We have seen that assembly language and machine language,
require deep knowledge of computer hardware where as in high level language require you to you
have to know only the instruction like English languages words.
have to know only the instruction like English languages words.
High level languages are simple languages that are use
English like words and mathematical symbols like +, - ,%, /,* etc for its program
constructions. High level languages enables programmer to concentrate more on the logic and less
on the syntax.
In the high level languages also require translator for converting instruction or program in corresponding machine language instructions is called compiler of interpreter.
In the high level languages also require translator for converting instruction or program in corresponding machine language instructions is called compiler of interpreter.
Features of this language are:
#1. In high level languages
program are written in simple English like language.
#2. In high level language programmer are more
concentrate on the programs logic and don't worry about hardware configurations.
#3. In high level language every instruction of program is translated into corresponding machine language instructions.
#4. High level language are easy write and use and
modify.
#5. In high level language have very less error
prone.
#6. In high level language a separate
translator is required.